

import requests
from lxml import etree

page = 1




while True:
    url = f"https://quotes.toscrape.com/page/{page}"
    res = requests.get(url)
    tree = etree.HTML(res.text)
    items = tree.xpath("//div[@class='quote']")

    for item in items:
        content = item.xpath('.//span[@class="text"]/text()')
        author = item.xpath('.//small/text()')[0]
        tags = item.xpath('.//a[@class="tag"]/text()')

        print(content,'\n',author,'\n',tags)
        break
    break





















